package xiaozhi.modules.chat.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 聊天DTO
 */
@Data
@Schema(description = "聊天对象")
public class ChatDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = -5707829409255370293L;

    @Schema(description = "会话历史id")
    private String chatHistoryId;

    @Schema(description = "mac地址")
    @NotBlank(message = "设备MAC地址不能为空")
    private String macAddress;

    @Schema(description = "faceId")
    @NotBlank(message = "faceId不能为空")
    private String faceId;

    @Schema(description = "角色（用户或助理）")
    private String role;

    @Schema(description = "对话内容")
    private String content;

    @Schema(description = "提示令牌数")
    private Integer promptTokens;

    @Schema(description = "总令牌数")
    private Integer totalTokens;

    @Schema(description = "完成令牌数")
    private Integer completionTokens;

    @Schema(description = "提示耗时（毫秒）")
    private Integer promptMs;

    @Schema(description = "总耗时（毫秒）")
    private Integer totalMs;

    @Schema(description = "完成耗时（毫秒）")
    private Integer completionMs;

    @Schema(description = "序号")
    private Integer sequence;

}
